import request from '@/utils/request'

// 查询工艺管理成形产品分类列表
export function listCategory(query) {
    return request({
        url: '/technology/technologyProductCategory/list',
        method: 'get',
        params: query
    })
}

// 查询工艺管理成形产品分类详细
export function getCategory(productCategoryId) {
    return request({
        url: '/technology/technologyProductCategory/' + productCategoryId,
        method: 'get'
    })
}

// 新增工艺管理成形产品分类
export function addCategory(data) {
    return request({
        url: '/technology/technologyProductCategory',
        method: 'post',
        data: data
    })
}

// 修改工艺管理成形产品分类
export function updateCategory(data) {
    return request({
        url: '/technology/technologyProductCategory',
        method: 'put',
        data: data
    })
}

// 删除工艺管理成形产品分类
export function delCategory(productCategoryId) {
    return request({
        url: '/technology/technologyProductCategory/' + productCategoryId,
        method: 'delete'
    })
}
// 查询工艺管理成形产品列表
export function listProduct(query) {
    return request({
        url: '/technology/technologyWorkingProduct/list',
        method: 'get',
        params: query
    })
}

// 查询工艺管理成形产品详细
export function getProduct(productId) {
    return request({
        url: '/technology/technologyWorkingProduct/' + productId,
        method: 'get'
    })
}

// 新增工艺管理成形产品
export function addProduct(data) {
    return request({
        url: '/technology/technologyWorkingProduct',
        method: 'post',
        data: data
    })
}

// 修改工艺管理成形产品
export function updateProduct(data) {
    return request({
        url: '/technology/technologyWorkingProduct',
        method: 'put',
        data: data
    })
}

// 删除工艺管理成形产品
export function delProduct(productId) {
    return request({
        url: '/technology/technologyWorkingProduct/' + productId,
        method: 'delete'
    })
}
// 获取工艺优选列表
export function getProcessOptimization(data) {
    return request({
        url: '/technology/technologyProcessOptimization/list',
        method: 'get',
        params:data
    })
}
// 同一加工任务，添加同一加工名称，进行判断

export function verifyProductName(data) {
    return request({
        url: '/technology/technologyWorkingProduct/verifyProductName',
        method: 'post',
        data:data
    })
}